-- GENERATED SPELL FOR [Necrotic Webspinner] --


function spell0_31747(pUnit, Event) --@Poison,n/a--
pUnit:FullCastSpellOnTarget(744,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31747', 30000, 1)
end

function spell1_31747(pUnit, Event) --@Web,n/a--
pUnit:FullCastSpellOnTarget(745,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31747', 5332, 1)
end

function Sorts_31747(pUnit, Event)
local choix_sorts_31747 = math.random(0, 1)
if choix_sorts_31747 == 0 then
pUnit:RegisterEvent('spell0_31747', 1, 1)
end
if choix_sorts_31747 == 1 then
pUnit:RegisterEvent('spell1_31747', 1, 1)
end
end

function mob31747_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_31747', math.random(1500, 3000), 1)
end

function mob31747_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob31747_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob31747_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(31747, 1, 'mob31747_Action')
RegisterUnitEvent(31747, 2, 'mob31747_Leave')
RegisterUnitEvent(31747, 3, 'mob31747_Kill')
RegisterUnitEvent(31747, 4, 'mob31747_Die')
